package com.wngbms.demo;

import java.util.HashMap;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;

public class Main {

    public static void main(String[] args) {
        // 编译报错
//        IDemo<Integer> demo = new IDemo<>();
        IDemo<TypeClass> demo = new IDemo<>();

        BiConsumer<Main, String> consume = Main::consume;
        Function<Main, Integer> supply = Main::supply;
        BiFunction<Main, Integer, Integer> apply = Main::apply;
        Consumer<Main> run = Main::run;

        Consumer<String> consume_s = Main::consume_s;
        Runnable supply_s = Main::supply_s;
        Function<Integer, Integer> apply_s = Main::apply_s;
        Runnable run_s = Main::run_s;

        Main m = new Main();
        Consumer<String> consume1 = m::consume;
        Runnable supply1 = m::supply;
        Function<Integer, Integer> apply1 = m::apply;
        Runnable run1 = m::run;
    }

    public static void run_s() {
    }

    public static int apply_s(int x) {
        return x * x;
    }

    public static int supply_s() {
        return 10;
    }

    public static void consume_s(String s) {
    }

    public void run() {
    }

    public int apply(int x) {
        return x * x;
    }

    public int supply() {
        return 10;
    }

    public void consume(String s) {
    }

}
